package cn.edu.wynu.oop.keywords;

public class Example3_08 {
    public static void main(String[] args) {
        Student student = new Student("大理国皇子", 20);
        System.out.println(student);
    }
}

class Student {
    String name;
    int age;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
